Playground chat tab: vscode.lm, scanner, bundler, fixture replay#22
Merged
Conversation
AlemTuzlak
previously approved these changes
May 4, 2026
Contributor
AlemTuzlak
left a comment
There was a problem hiding this comment.
Left commentd that need to be addressed, agent go go
| ## Links | ||
|
|
||
| - Website — https://copilotkit.ai | ||
| - GitHub — https://github.com/CopilotKit/vscode-extension |
| ## Feedback | ||
|
|
||
| Bugs and feature requests → https://github.com/CopilotKit/vscode-extension/issues | ||
| Bugs and feature requests → https://github.com/CopilotKit/CopilotKit/issues |
| Cutting a release is one file edit, one commit, one PR. | ||
|
|
||
| 1. Prepend an entry to `CHANGELOG.md`: | ||
| 1. Prepend an entry to `packages/vscode-extension/CHANGELOG.md`: |
| "react" | ||
| ], | ||
| "homepage": "https://vscode.copilotkit.dev", | ||
| "homepage": "https://copilotkit.ai", |
| "private": true, | ||
| "dependencies": { | ||
| "@copilotkit/a2ui-renderer": "^1.56.4", | ||
| "@copilotkit/a2ui-renderer": "workspace:*", |
| // Resolve workspace packages to their TypeScript source instead of compiled | ||
| // dist. This avoids CJS-to-ESM interop bugs in Rolldown (e.g., variable | ||
| // shadowing in __commonJSMin wrappers that cause TDZ errors). | ||
| const workspaceSourceAliases: Record<string, string> = { |
Contributor
There was a problem hiding this comment.
This id not needed i believe, ask an agent
| // CSS collector — the user's workspace `node_modules` may not | ||
| // resolve the bare specifier from the codegen entry's directory. | ||
| copyCssAsset( | ||
| path.resolve(import.meta.dirname, "../react-core/dist/v2/index.css"), |
AlemTuzlak
reviewed
May 4, 2026
| Use Keep-a-Changelog subsections: `Added`, `Changed`, `Fixed`, `Removed`, `Deprecated`, `Security`. The date is whatever date you commit. | ||
|
|
||
| If you also want to change how the extension is described on the Marketplace / Open VSX listing page, edit the first paragraph under the `# CopilotKit for VS Code` title in `README.md` in the same PR. The metadata-sync workflow extracts that paragraph, strips inline markdown, and writes it to `package.json.description` (the field both registries render as the one-liner). First paragraph must stay ≤200 chars — the workflow fails fast otherwise so you don't silently ship a truncated listing. | ||
| If you also want to change how the extension is described on the Marketplace / Open VSX listing page, edit the first paragraph under the `# CopilotKit for VS Code` title in `packages/vscode-extension/README.md` in the same PR. The metadata-sync workflow extracts that paragraph, strips inline markdown, and writes it to `package.json.description` (the field both registries render as the one-liner). First paragraph must stay ≤200 chars — the workflow fails fast otherwise so you don't silently ship a truncated listing. |
Contributor
There was a problem hiding this comment.
Packages/vscode-extension doesn't exist, every reference to it is wrong
|
|
||
| 1. **SP not added as Contributor on the Marketplace publisher.** `copilotkit-vscode-publish` must be a member of the `copilotkit` publisher at <https://marketplace.visualstudio.com/manage/publishers/copilotkit> with the Contributor (or higher) role. | ||
| 2. **Federated credential subject mismatch.** The credential on the Entra app must have subject **exactly** `repo:CopilotKit/vscode-extension:environment:production` (case-sensitive, no trailing slash). The workflow's `environment: production` must match that subject byte-for-byte. | ||
| 2. **Federated credential subject mismatch.** The credential on the Entra app must have subject **exactly** `repo:CopilotKit/CopilotKit:environment:production` (case-sensitive, no trailing slash). The workflow's `environment: production` must match that subject byte-for-byte. |
Contributor
There was a problem hiding this comment.
Repo is CopilotKit/vscode-extension
|
|
||
| - **ADO PAT retirement (2026-12-01):** Azure DevOps is sunsetting long-lived Marketplace PATs. This workflow has been migrated to OIDC / federated credentials ahead of that date; `VSCE_PAT` is retained only as a short-lived rollback lever (see above). | ||
| - **If a release needs to pin to a specific `@copilotkit/*` version**, bump the dependency in `package.json` as part of the same PR that updates the CHANGELOG. | ||
| - **If the npm monorepo release pipeline ever needs to coordinate with VSIX releases** (e.g. pin the extension to a known-good `@copilotkit/*` version), extend `release.config.json` with a `vscode-extension` scope and gate it on the same version-on-main trigger — do not try to bolt VSIX publishing onto `scripts/release/publish-release.ts` which is npm-only. |
Contributor
There was a problem hiding this comment.
Revert, this wqs moved out of tge monorepo
| }, | ||
| "dependencies": { | ||
| "@ag-ui/client": "0.0.52", | ||
| "@copilotkit/runtime": "workspace:*", |
Contributor
There was a problem hiding this comment.
All workspace:* are wrong they have to be pinned to,the latest version properly
AlemTuzlak
previously approved these changes
May 4, 2026
cd1cd5a to
025a282
Compare
Scanner detects <CopilotKit> JSX nodes, serializes props, maps hooks to components (including anonymous default exports). Codegen emits aggregator, entry, error-boundary, provider-chain templates with shared import-specifier utility. Recursive renderValue handles nested UnserializableRef in provider props. Rolldown bundler with Tailwind v4 compile and file watcher for hot-reload. vscode.lm factory with live/record/replay modes, model picker, runtime host with SSE, fixture store with path traversal protection, version validation, name collision avoidance. Fixture replay supports both TEXT_MESSAGE_CONTENT and TEXT_MESSAGE_CHUNK AG-UI event types. SSE error handling uses sentinel error name for RUN_ERROR events. Scanner caches file contents. View provider posts user-visible errors on missing provider or failed codegen, resets replay state on dispose, clears stale bundle on model switch.
Custom PlaygroundChat drives the runtime over SSE, executes frontend tool handlers locally, renders markdown, animates fixture replay. Resizable/collapsible panels with localStorage persistence. Bundle loader with CSP nonce bootstrap, forwarding stubs for v2 provider. Error message handler for extension host errors.
Replace fixture components with playground app structure using useFrontendTool with deterministic mock-data handlers. v1/v2 example components, CurrentWeatherTool, Tailwind globals. Type-compatible with published @copilotkit/* packages.
Pin @copilotkit/* to ^1.56.5, inline base tsconfig, use builtinModules for NODE_BUILTINS, stubNodeBuiltinsAndCss on all browser webview entries. Gitignore node_modules/dist/vsix/tsbuildinfo. Vitest setup for localStorage polyfill and @CopilotKit CSS inline deps. Add LanguageModelToolResultPart to test mocks, fix disconnected AbortController in test fixtures. Bump version to 0.2.0. CHANGELOG documents Playground feature and hardening fixes. Add [Unreleased] convention to CHANGELOG and RELEASING.md. Publish workflow strips [Unreleased] section before packaging VSIX so unreleased work never appears on the Marketplace. README documents Playground panel, fixes engine version to 1.90.0. Update all URLs, paths, OIDC subjects for standalone repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrated from CopilotKit/CopilotKit#4635 (by @AlemTuzlak) to the standalone repo.
vscode.lm), with optionalvscode.lm.toolsforwarding so the model can use Copilot's web-fetch tool out of the box<CopilotKit>JSX nodes, serializes props, walks ancestors, maps hooks to components, and orchestrates multi-file scanningPlaygroundChatthat drives the runtime over SSE, executes frontend tool handlers locally, supportsfollowUp: false, renders markdown, and animates fixture replay.copilotkit/fixtureswith v2 schema (RecordedCall[]) and replay modeuseFrontendTooland deterministic mock-data handlersTest plan
vitest runpasses locally (300 tests)test-workspace, open Chat tab, ask "what's the weather in Sarajevo?" — renders populated WeatherCard